Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Editing Movies / Editing Movies


NewMovieFromScrap

The NewMovieFromScrap function allows your application to create a movie from the contents of the scrap, if this is possible. If there is no movie data on the scrap, the Movie Toolbox does not create a new movie.

pascal Movie NewMovieFromScrap (long newMovieFlags);
newMovieFlags
Controls the operation of the NewMovieFromScrap function. The following flags are available (set unused flags to 0):
newMovieActive
Controls whether the new movie is active. Set this flag to 1 to make the new movie active. A movie that does not have any tracks can still be active. When the Movie Toolbox tries to play the movie, no images are displayed, because there is no movie data. Unless you set this flag, you should call the SetMovieActive function (described on page 2-131) to play a movie.
newMovieDontResolveDataRefs
Controls how completely the Movie Toolbox resolves data references in the movie resource. If you set this flag to 0, the toolbox tries to completely resolve all data references in the resource. This may involve searching for files on remote volumes. If you set this flag to 1, the Movie Toolbox only looks in the specified file.
If the Movie Toolbox cannot completely resolve all the data references, it still returns a valid movie identifier. In this case, the Movie Toolbox also sets the current error value to couldNotResolveDataRef.
newMovieDontAskUnresolvedDataRefs
Controls whether the Movie Toolbox asks the user to locate files. If you set this flag to 0, the Movie Toolbox asks the user to locate files that it cannot find on available volumes. If the Movie Toolbox cannot locate a file even with the user's help, the function returns a valid movie identifier and sets the current error value to couldNotResolveDataRef.
newMovieDontAutoAlternate
Controls whether the Movie Toolbox automatically selects enabled tracks from alternate track groups. If you set this flag to 1, the Movie Toolbox does not automatically select tracks for the movie--you must enable tracks yourself.
DESCRIPTION
The NewMovieFromScrap function returns the new movie's identifier. If the function cannot load the movie, the returned identifier is set to nil.

ERROR CODES
couldNotResolveDataRef-2000Cannot use this data reference
cantFindHandler-2003Cannot locate a handler
cantOpenHandler-2004Cannot open a handler
invalidMedia-2008This media is corrupted or invalid
File Manager errors
Memory Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996